{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 150,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = np.loadtxt('./ex1data1.txt',delimiter=',', dtype='float32')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 188,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_t = np.append(np.reshape(np.ones(len(data)),[len(data),1]), data, axis=1)\n",
    "X = data_t[...,0:2]\n",
    "data_x = data_t[...,1:2]\n",
    "data_y = data_t[...,2:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 189,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1e5ec435d88>]"
      ]
     },
     "execution_count": 189,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEHCAYAAACncpHfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de5ScVZnv8e/T3QGR2AQaaCMXAwPLM0QkpiPH9nY6oojMyEVU5Lgkx7AmsjAz5IAI6NHBYSRAxCteyEggcaJhRkAuKyNg7MZLGjAJuRoVcEUMRJhEQhPUJkk/54/9Fl1dqctb1fXW7f191upV1e+l6kl1ZT9773e/e5u7IyIi6dNW7wBERKQ+lABERFJKCUBEJKWUAEREUkoJQEQkpZQARERSqiOpFzazo4AlwKuBEWChu3/VzK4C/gH47+jQT7v78mKvdeihh/qUKVMqiuPFF1/kwAMPrOjcelC8yWu2mBVvspotXogf8+rVq7e7+2EFD3D3RH6AycD06PmrgN8CJwBXAZ8s57V6enq8Uv39/RW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rUARERSStcARERSSglARCSllABERFJKCUBEJKWUAEREUkoJQEQkpf4/hqDcjmvzqBEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.xlabel('Population of city in 10,000s')\n",
    "plt.ylabel('Profit in $10,000s')\n",
    "plt.grid(True)\n",
    "plt.plot(data_x, data_y, 'r.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {},
   "outputs": [],
   "source": [
    "def costValue(x_i, y_i, theta):\n",
    "    cost = np.power(((x_i @ theta)- y_i),2)\n",
    "    return np.sum(cost)/(2*len(x_i))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_theta(X,y, a, iterator)->np.ndarray: #梯度下降求theta\n",
    "    temp = np.zeros((data.shape[1]-1,1)) #创立theta 为0的向量. np.zeros((行，列))\n",
    "    theta = temp\n",
    "    cost = np.zeros(iterator)\n",
    "    #temp theta (2 * 1)\n",
    "    x_i = data[...,0:2] # (97 * 2)\n",
    "    y_i = data[...,2:3] # (97 * 1)\n",
    "    # 假设函数 h(x) = theta_0 + theta_1 * x\n",
    "    #则 J(theta)计算如下\n",
    "  \n",
    "    m = x_i.shape[0]\n",
    "    \n",
    "    for i in range(iterator):\n",
    "        for j in range(0, x_i.shape[1]):\n",
    "            error = 0\n",
    "            for k in range(m):\n",
    "                error += (theta[0] * data[k,0] + theta[1] * data[k, 1] - data[k, 2])*data[k,j]\n",
    "            temp[j] = theta[j] - (a / m) * error\n",
    "        theta = temp\n",
    "        \n",
    "        cost[i] = costValue(x_i, y_i, theta)\n",
    "                            \n",
    "    return theta,cost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_theta_2(X,y, a, iterator) -> np.ndarray:  # 梯度下降求theta\n",
    "\n",
    "    temp = np.matrix(np.zeros(X.shape[1]))  # 初始化一个 θ 临时矩阵(1, 2)\n",
    "    theta = temp\n",
    "    cost = np.zeros(iterator)  # 初始化一个ndarray，包含每次epoch的cost\n",
    "    m = X.shape[0]  # 样本数量m\n",
    "\n",
    "    for i in range(iterator):\n",
    "        # 利用向量化一步求解\n",
    "        temp = theta - (a / m) * (X * theta.T - y).T * X\n",
    "\n",
    "        theta = temp\n",
    "        #cost[i] = costValue(X, y, theta)\n",
    "    return theta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "metadata": {},
   "outputs": [],
   "source": [
    "def NormalEquation(X,y): #正规方程求解theta\n",
    "    # Xt = np.transpose(X)\n",
    "    # XtX = np.dot(Xt,X)\n",
    "    # Xty = np.dot(Xt, y)\n",
    "    # theta = np.linalg.solve(XtX,Xty)\n",
    "    X = np.matrix(X)\n",
    "    y = np.matrix(y)\n",
    "    theta = (X.T * X).I * X.T * y\n",
    "    return theta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "metadata": {},
   "outputs": [],
   "source": [
    "theta, cost= get_theta(data_t, 0.01, 1000)\n",
    "theta_2 = get_theta_2(X,data_y, 0.01, 1000)\n",
    "theta_3 = NormalEquation(X,data_y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([6.79372781, 5.93459576, 5.9014281 , 5.89550307, 5.89036231,\n",
       "       5.88523673, 5.88012424, 5.87502912, 5.86995228, 5.86489384,\n",
       "       5.85985376, 5.85483198, 5.84982843, 5.84484305, 5.83987578,\n",
       "       5.83492655, 5.82999529, 5.82508193, 5.82018642, 5.81530869,\n",
       "       5.81044867, 5.80560629, 5.80078151, 5.79597424, 5.79118443,\n",
       "       5.78641201, 5.78165693, 5.77691911, 5.77219849, 5.76749502,\n",
       "       5.76280863, 5.75813926, 5.75348684, 5.74885132, 5.74423263,\n",
       "       5.73963071, 5.73504551, 5.73047696, 5.72592499, 5.72138956,\n",
       "       5.71687059, 5.71236804, 5.70788183, 5.70341192, 5.69895824,\n",
       "       5.69452073, 5.69009934, 5.685694  , 5.68130466, 5.67693126,\n",
       "       5.67257374, 5.66823205, 5.66390612, 5.6595959 , 5.65530133,\n",
       "       5.65102236, 5.64675892, 5.64251097, 5.63827845, 5.63406129,\n",
       "       5.62985945, 5.62567287, 5.62150149, 5.61734525, 5.61320411,\n",
       "       5.60907801, 5.6049669 , 5.60087071, 5.59678939, 5.5927229 ,\n",
       "       5.58867117, 5.58463416, 5.58061181, 5.57660406, 5.57261087,\n",
       "       5.56863218, 5.56466794, 5.56071809, 5.55678258, 5.55286137,\n",
       "       5.5489544 , 5.54506161, 5.54118296, 5.5373184 , 5.53346787,\n",
       "       5.52963132, 5.5258087 , 5.52199997, 5.51820506, 5.51442394,\n",
       "       5.51065655, 5.50690284, 5.50316276, 5.49943626, 5.49572329,\n",
       "       5.49202381, 5.48833776, 5.4846651 , 5.48100577, 5.47735973,\n",
       "       5.47372694, 5.47010733, 5.46650087, 5.4629075 , 5.45932719,\n",
       "       5.45575987, 5.45220551, 5.44866406, 5.44513547, 5.44161969,\n",
       "       5.43811668, 5.43462639, 5.43114877, 5.42768378, 5.42423138,\n",
       "       5.42079151, 5.41736413, 5.4139492 , 5.41054667, 5.4071565 ,\n",
       "       5.40377863, 5.40041304, 5.39705966, 5.39371847, 5.3903894 ,\n",
       "       5.38707243, 5.3837675 , 5.38047457, 5.3771936 , 5.37392454,\n",
       "       5.37066736, 5.367422  , 5.36418843, 5.3609666 , 5.35775647,\n",
       "       5.354558  , 5.35137114, 5.34819586, 5.34503211, 5.34187984,\n",
       "       5.33873902, 5.33560961, 5.33249156, 5.32938484, 5.32628939,\n",
       "       5.32320519, 5.32013219, 5.31707034, 5.31401962, 5.31097997,\n",
       "       5.30795136, 5.30493375, 5.3019271 , 5.29893137, 5.29594651,\n",
       "       5.29297249, 5.29000928, 5.28705682, 5.28411509, 5.28118404,\n",
       "       5.27826363, 5.27535383, 5.27245459, 5.26956588, 5.26668766,\n",
       "       5.2638199 , 5.26096255, 5.25811557, 5.25527893, 5.2524526 ,\n",
       "       5.24963652, 5.24683068, 5.24403502, 5.24124951, 5.23847412,\n",
       "       5.23570881, 5.23295354, 5.23020828, 5.22747298, 5.22474762,\n",
       "       5.22203215, 5.21932655, 5.21663077, 5.21394478, 5.21126854,\n",
       "       5.20860203, 5.20594519, 5.203298  , 5.20066043, 5.19803244,\n",
       "       5.19541398, 5.19280504, 5.19020557, 5.18761554, 5.18503491,\n",
       "       5.18246366, 5.17990175, 5.17734913, 5.17480579, 5.17227168,\n",
       "       5.16974678, 5.16723104, 5.16472444, 5.16222694, 5.15973851,\n",
       "       5.15725912, 5.15478873, 5.15232731, 5.14987484, 5.14743126,\n",
       "       5.14499656, 5.1425707 , 5.14015365, 5.13774538, 5.13534586,\n",
       "       5.13295504, 5.13057291, 5.12819943, 5.12583457, 5.12347829,\n",
       "       5.12113058, 5.11879139, 5.11646069, 5.11413845, 5.11182465,\n",
       "       5.10951925, 5.10722223, 5.10493354, 5.10265317, 5.10038108,\n",
       "       5.09811723, 5.09586161, 5.09361418, 5.09137491, 5.08914377,\n",
       "       5.08692074, 5.08470578, 5.08249886, 5.08029995, 5.07810903,\n",
       "       5.07592607, 5.07375103, 5.07158389, 5.06942462, 5.06727319,\n",
       "       5.06512958, 5.06299375, 5.06086567, 5.05874533, 5.05663268,\n",
       "       5.05452771, 5.05243037, 5.05034066, 5.04825853, 5.04618397,\n",
       "       5.04411694, 5.04205741, 5.04000536, 5.03796077, 5.0359236 ,\n",
       "       5.03389383, 5.03187142, 5.02985637, 5.02784863, 5.02584818,\n",
       "       5.02385499, 5.02186905, 5.01989031, 5.01791876, 5.01595437,\n",
       "       5.01399712, 5.01204697, 5.0101039 , 5.00816789, 5.00623891,\n",
       "       5.00431693, 5.00240194, 5.00049389, 4.99859278, 4.99669857,\n",
       "       4.99481124, 4.99293076, 4.99105711, 4.98919027, 4.9873302 ,\n",
       "       4.98547689, 4.98363031, 4.98179043, 4.97995724, 4.9781307 ,\n",
       "       4.9763108 , 4.9744975 , 4.97269079, 4.97089064, 4.96909703,\n",
       "       4.96730993, 4.96552932, 4.96375518, 4.96198748, 4.9602262 ,\n",
       "       4.95847131, 4.9567228 , 4.95498063, 4.9532448 , 4.95151526,\n",
       "       4.94979201, 4.94807501, 4.94636425, 4.94465971, 4.94296135,\n",
       "       4.94126916, 4.93958311, 4.93790319, 4.93622937, 4.93456162,\n",
       "       4.93289993, 4.93124428, 4.92959464, 4.92795099, 4.92631331,\n",
       "       4.92468157, 4.92305576, 4.92143586, 4.91982183, 4.91821367,\n",
       "       4.91661135, 4.91501484, 4.91342414, 4.91183921, 4.91026003,\n",
       "       4.9086866 , 4.90711887, 4.90555684, 4.90400048, 4.90244977,\n",
       "       4.90090469, 4.89936522, 4.89783135, 4.89630304, 4.89478029,\n",
       "       4.89326306, 4.89175134, 4.89024511, 4.88874436, 4.88724905,\n",
       "       4.88575917, 4.8842747 , 4.88279563, 4.88132192, 4.87985357,\n",
       "       4.87839055, 4.87693284, 4.87548042, 4.87403328, 4.87259139,\n",
       "       4.87115474, 4.86972331, 4.86829708, 4.86687602, 4.86546013,\n",
       "       4.86404937, 4.86264374, 4.86124321, 4.85984777, 4.8584574 ,\n",
       "       4.85707208, 4.85569178, 4.8543165 , 4.85294622, 4.8515809 ,\n",
       "       4.85022055, 4.84886514, 4.84751465, 4.84616906, 4.84482836,\n",
       "       4.84349253, 4.84216155, 4.8408354 , 4.83951407, 4.83819754,\n",
       "       4.83688578, 4.83557879, 4.83427655, 4.83297904, 4.83168623,\n",
       "       4.83039813, 4.8291147 , 4.82783593, 4.8265618 , 4.8252923 ,\n",
       "       4.82402741, 4.82276712, 4.8215114 , 4.82026024, 4.81901363,\n",
       "       4.81777154, 4.81653396, 4.81530088, 4.81407227, 4.81284813,\n",
       "       4.81162843, 4.81041316, 4.8092023 , 4.80799584, 4.80679376,\n",
       "       4.80559605, 4.80440268, 4.80321365, 4.80202894, 4.80084853,\n",
       "       4.79967241, 4.79850055, 4.79733296, 4.7961696 , 4.79501046,\n",
       "       4.79385554, 4.79270481, 4.79155826, 4.79041587, 4.78927763,\n",
       "       4.78814353, 4.78701354, 4.78588766, 4.78476586, 4.78364814,\n",
       "       4.78253448, 4.78142486, 4.78031927, 4.7792177 , 4.77812012,\n",
       "       4.77702653, 4.77593692, 4.77485126, 4.77376954, 4.77269175,\n",
       "       4.77161787, 4.7705479 , 4.76948181, 4.76841959, 4.76736122,\n",
       "       4.76630671, 4.76525602, 4.76420914, 4.76316607, 4.76212679,\n",
       "       4.76109128, 4.76005953, 4.75903152, 4.75800725, 4.7569867 ,\n",
       "       4.75596986, 4.7549567 , 4.75394723, 4.75294142, 4.75193927,\n",
       "       4.75094075, 4.74994586, 4.74895459, 4.74796691, 4.74698282,\n",
       "       4.7460023 , 4.74502535, 4.74405194, 4.74308207, 4.74211571,\n",
       "       4.74115287, 4.74019353, 4.73923766, 4.73828527, 4.73733634,\n",
       "       4.73639085, 4.7354488 , 4.73451017, 4.73357494, 4.73264312,\n",
       "       4.73171467, 4.7307896 , 4.72986789, 4.72894952, 4.72803449,\n",
       "       4.72712278, 4.72621439, 4.72530929, 4.72440747, 4.72350894,\n",
       "       4.72261366, 4.72172164, 4.72083286, 4.7199473 , 4.71906496,\n",
       "       4.71818582, 4.71730988, 4.71643712, 4.71556752, 4.71470109,\n",
       "       4.7138378 , 4.71297765, 4.71212061, 4.7112667 , 4.71041588,\n",
       "       4.70956815, 4.7087235 , 4.70788192, 4.70704339, 4.70620791,\n",
       "       4.70537546, 4.70454604, 4.70371963, 4.70289622, 4.70207579,\n",
       "       4.70125835, 4.70044388, 4.69963236, 4.69882379, 4.69801816,\n",
       "       4.69721545, 4.69641566, 4.69561877, 4.69482478, 4.69403367,\n",
       "       4.69324543, 4.69246006, 4.69167753, 4.69089785, 4.690121  ,\n",
       "       4.68934697, 4.68857575, 4.68780733, 4.68704171, 4.68627886,\n",
       "       4.68551878, 4.68476146, 4.6840069 , 4.68325507, 4.68250597,\n",
       "       4.6817596 , 4.68101593, 4.68027497, 4.67953669, 4.6788011 ,\n",
       "       4.67806817, 4.67733791, 4.6766103 , 4.67588534, 4.675163  ,\n",
       "       4.67444329, 4.67372619, 4.6730117 , 4.6722998 , 4.67159049,\n",
       "       4.67088375, 4.67017958, 4.66947796, 4.6687789 , 4.66808237,\n",
       "       4.66738837, 4.66669689, 4.66600792, 4.66532146, 4.66463749,\n",
       "       4.663956  , 4.66327698, 4.66260043, 4.66192634, 4.6612547 ,\n",
       "       4.66058549, 4.65991872, 4.65925437, 4.65859242, 4.65793289,\n",
       "       4.65727575, 4.65662099, 4.65596861, 4.6553186 , 4.65467095,\n",
       "       4.65402566, 4.6533827 , 4.65274209, 4.65210379, 4.65146782,\n",
       "       4.65083415, 4.65020279, 4.64957372, 4.64894693, 4.64832242,\n",
       "       4.64770018, 4.6470802 , 4.64646246, 4.64584698, 4.64523372,\n",
       "       4.6446227 , 4.64401389, 4.64340729, 4.6428029 , 4.6422007 ,\n",
       "       4.64160069, 4.64100285, 4.64040719, 4.63981369, 4.63922235,\n",
       "       4.63863315, 4.63804609, 4.63746117, 4.63687837, 4.63629768,\n",
       "       4.63571911, 4.63514263, 4.63456825, 4.63399595, 4.63342573,\n",
       "       4.63285759, 4.6322915 , 4.63172748, 4.6311655 , 4.63060556,\n",
       "       4.63004765, 4.62949177, 4.62893791, 4.62838606, 4.62783621,\n",
       "       4.62728836, 4.6267425 , 4.62619863, 4.62565672, 4.62511679,\n",
       "       4.62457881, 4.62404279, 4.62350872, 4.62297659, 4.62244638,\n",
       "       4.62191811, 4.62139175, 4.6208673 , 4.62034476, 4.61982411,\n",
       "       4.61930536, 4.61878849, 4.61827349, 4.61776037, 4.61724911,\n",
       "       4.61673971, 4.61623215, 4.61572644, 4.61522257, 4.61472053,\n",
       "       4.6142203 , 4.6137219 , 4.6132253 , 4.61273051, 4.61223752,\n",
       "       4.61174631, 4.61125689, 4.61076925, 4.61028338, 4.60979927,\n",
       "       4.60931692, 4.60883632, 4.60835747, 4.60788035, 4.60740497,\n",
       "       4.60693131, 4.60645938, 4.60598916, 4.60552064, 4.60505383,\n",
       "       4.60458871, 4.60412528, 4.60366354, 4.60320347, 4.60274507,\n",
       "       4.60228834, 4.60183326, 4.60137984, 4.60092806, 4.60047793,\n",
       "       4.60002943, 4.59958255, 4.59913731, 4.59869367, 4.59825165,\n",
       "       4.59781123, 4.59737242, 4.59693519, 4.59649956, 4.5960655 ,\n",
       "       4.59563303, 4.59520212, 4.59477278, 4.59434499, 4.59391876,\n",
       "       4.59349408, 4.59307094, 4.59264934, 4.59222927, 4.59181072,\n",
       "       4.59139369, 4.59097818, 4.59056418, 4.59015168, 4.58974067,\n",
       "       4.58933117, 4.58892314, 4.5885166 , 4.58811154, 4.58770794,\n",
       "       4.58730582, 4.58690515, 4.58650593, 4.58610817, 4.58571185,\n",
       "       4.58531697, 4.58492353, 4.58453151, 4.58414092, 4.58375174,\n",
       "       4.58336398, 4.58297763, 4.58259268, 4.58220912, 4.58182696,\n",
       "       4.58144619, 4.5810668 , 4.58068879, 4.58031215, 4.57993688,\n",
       "       4.57956297, 4.57919042, 4.57881923, 4.57844938, 4.57808087,\n",
       "       4.5777137 , 4.57734787, 4.57698336, 4.57662018, 4.57625831,\n",
       "       4.57589776, 4.57553852, 4.57518058, 4.57482395, 4.57446861,\n",
       "       4.57411456, 4.57376179, 4.57341031, 4.5730601 , 4.57271116,\n",
       "       4.57236349, 4.57201709, 4.57167194, 4.57132804, 4.5709854 ,\n",
       "       4.570644  , 4.57030383, 4.56996491, 4.56962721, 4.56929074,\n",
       "       4.56895549, 4.56862146, 4.56828864, 4.56795703, 4.56762663,\n",
       "       4.56729742, 4.56696941, 4.5666426 , 4.56631696, 4.56599252,\n",
       "       4.56566924, 4.56534715, 4.56502622, 4.56470646, 4.56438786,\n",
       "       4.56407041, 4.56375412, 4.56343898, 4.56312498, 4.56281212,\n",
       "       4.5625004 , 4.56218981, 4.56188035, 4.56157201, 4.56126479,\n",
       "       4.56095869, 4.5606537 , 4.56034982, 4.56004704, 4.55974536,\n",
       "       4.55944477, 4.55914528, 4.55884687, 4.55854955, 4.55825331,\n",
       "       4.55795814, 4.55766404, 4.55737102, 4.55707905, 4.55678815,\n",
       "       4.5564983 , 4.55620951, 4.55592177, 4.55563507, 4.55534941,\n",
       "       4.55506478, 4.5547812 , 4.55449864, 4.55421711, 4.5539366 ,\n",
       "       4.5536571 , 4.55337863, 4.55310116, 4.55282471, 4.55254925,\n",
       "       4.5522748 , 4.55200134, 4.55172888, 4.5514574 , 4.55118692,\n",
       "       4.55091741, 4.55064888, 4.55038133, 4.55011475, 4.54984914,\n",
       "       4.54958449, 4.5493208 , 4.54905807, 4.5487963 , 4.54853547,\n",
       "       4.54827559, 4.54801666, 4.54775867, 4.54750161, 4.54724549,\n",
       "       4.54699029, 4.54673603, 4.54648268, 4.54623026, 4.54597875,\n",
       "       4.54572816, 4.54547848, 4.5452297 , 4.54498183, 4.54473485,\n",
       "       4.54448878, 4.54424359, 4.5439993 , 4.5437559 , 4.54351338,\n",
       "       4.54327174, 4.54303097, 4.54279108, 4.54255207, 4.54231392,\n",
       "       4.54207663, 4.54184021, 4.54160464, 4.54136994, 4.54113608,\n",
       "       4.54090307, 4.54067091, 4.54043959, 4.54020911, 4.53997947,\n",
       "       4.53975066, 4.53952269, 4.53929554, 4.53906921, 4.53884371,\n",
       "       4.53861903, 4.53839516, 4.53817211, 4.53794986, 4.53772843,\n",
       "       4.53750779, 4.53728796, 4.53706893, 4.53685069, 4.53663324,\n",
       "       4.53641659, 4.53620072, 4.53598563, 4.53577133, 4.5355578 ,\n",
       "       4.53534505, 4.53513307, 4.53492186, 4.53471142, 4.53450175,\n",
       "       4.53429283, 4.53408467, 4.53387727, 4.53367062, 4.53346473,\n",
       "       4.53325958, 4.53305517, 4.53285151, 4.53264858, 4.5324464 ,\n",
       "       4.53224495, 4.53204423, 4.53184423, 4.53164497, 4.53144643,\n",
       "       4.53124861, 4.5310515 , 4.53085512, 4.53065944, 4.53046448,\n",
       "       4.53027023, 4.53007668, 4.52988383, 4.52969168, 4.52950023,\n",
       "       4.52930948, 4.52911942, 4.52893005, 4.52874137, 4.52855337,\n",
       "       4.52836605, 4.52817942, 4.52799346, 4.52780818, 4.52762357,\n",
       "       4.52743963, 4.52725636, 4.52707376, 4.52689182, 4.52671053,\n",
       "       4.52652991, 4.52634994, 4.52617063, 4.52599197, 4.52581396,\n",
       "       4.52563659, 4.52545987, 4.52528378, 4.52510834, 4.52493354,\n",
       "       4.52475937, 4.52458583, 4.52441292, 4.52424064, 4.52406899,\n",
       "       4.52389796, 4.52372755, 4.52355776, 4.52338859, 4.52322003,\n",
       "       4.52305208, 4.52288474, 4.52271801, 4.52255189, 4.52238636,\n",
       "       4.52222144, 4.52205712, 4.5218934 , 4.52173027, 4.52156773,\n",
       "       4.52140578, 4.52124442, 4.52108365, 4.52092346, 4.52076385,\n",
       "       4.52060483, 4.52044637, 4.5202885 , 4.5201312 , 4.51997447,\n",
       "       4.5198183 , 4.51966271, 4.51950768, 4.51935321, 4.51919931,\n",
       "       4.51904596, 4.51889317, 4.51874094, 4.51858925, 4.51843812,\n",
       "       4.51828754, 4.5181375 , 4.51798801, 4.51783907, 4.51769066,\n",
       "       4.51754279, 4.51739546, 4.51724866, 4.5171024 , 4.51695667,\n",
       "       4.51681146, 4.51666679, 4.51652264, 4.51637901, 4.51623591,\n",
       "       4.51609332, 4.51595125, 4.5158097 , 4.51566866, 4.51552814,\n",
       "       4.51538812, 4.51524862, 4.51510962, 4.51497112, 4.51483313])"
      ]
     },
     "execution_count": 199,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.28704087e+00, 4.15358738e-02, 2.17511078e-03, 9.28213576e-04,\n",
       "       8.85716138e-04, 8.81288581e-04, 8.78075134e-04, 8.74911122e-04,\n",
       "       8.71759704e-04, 8.68619675e-04, 8.65490957e-04, 8.62373508e-04,\n",
       "       8.59267289e-04, 8.56172258e-04, 8.53088375e-04, 8.50015599e-04,\n",
       "       8.46953892e-04, 8.43903213e-04, 8.40863523e-04, 8.37834781e-04,\n",
       "       8.34816948e-04, 8.31809986e-04, 8.28813855e-04, 8.25828515e-04,\n",
       "       8.22853928e-04, 8.19890056e-04, 8.16936859e-04, 8.13994300e-04,\n",
       "       8.11062340e-04, 8.08140940e-04, 8.05230063e-04, 8.02329671e-04,\n",
       "       7.99439726e-04, 7.96560190e-04, 7.93691026e-04, 7.90832197e-04,\n",
       "       7.87983665e-04, 7.85145393e-04, 7.82317345e-04, 7.79499483e-04,\n",
       "       7.76691771e-04, 7.73894172e-04, 7.71106650e-04, 7.68329169e-04,\n",
       "       7.65561691e-04, 7.62804182e-04, 7.60056606e-04, 7.57318926e-04,\n",
       "       7.54591107e-04, 7.51873113e-04, 7.49164910e-04, 7.46466461e-04,\n",
       "       7.43777732e-04, 7.41098687e-04, 7.38429293e-04, 7.35769513e-04,\n",
       "       7.33119314e-04, 7.30478660e-04, 7.27847518e-04, 7.25225854e-04,\n",
       "       7.22613632e-04, 7.20010820e-04, 7.17417382e-04, 7.14833286e-04,\n",
       "       7.12258498e-04, 7.09692984e-04, 7.07136711e-04, 7.04589645e-04,\n",
       "       7.02051754e-04, 6.99523004e-04, 6.97003363e-04, 6.94492797e-04,\n",
       "       6.91991274e-04, 6.89498762e-04, 6.87015227e-04, 6.84540638e-04,\n",
       "       6.82074962e-04, 6.79618167e-04, 6.77170222e-04, 6.74731094e-04,\n",
       "       6.72300751e-04, 6.69879163e-04, 6.67466297e-04, 6.65062122e-04,\n",
       "       6.62666607e-04, 6.60279720e-04, 6.57901430e-04, 6.55531707e-04,\n",
       "       6.53170520e-04, 6.50817838e-04, 6.48473629e-04, 6.46137865e-04,\n",
       "       6.43810513e-04, 6.41491545e-04, 6.39180930e-04, 6.36878637e-04,\n",
       "       6.34584637e-04, 6.32298900e-04, 6.30021396e-04, 6.27752095e-04,\n",
       "       6.25490968e-04, 6.23237986e-04, 6.20993119e-04, 6.18756337e-04,\n",
       "       6.16527613e-04, 6.14306916e-04, 6.12094218e-04, 6.09889490e-04,\n",
       "       6.07692703e-04, 6.05503829e-04, 6.03322839e-04, 6.01149705e-04,\n",
       "       5.98984399e-04, 5.96826892e-04, 5.94677156e-04, 5.92535163e-04,\n",
       "       5.90400885e-04, 5.88274296e-04, 5.86155365e-04, 5.84044068e-04,\n",
       "       5.81940375e-04, 5.79844259e-04, 5.77755694e-04, 5.75674651e-04,\n",
       "       5.73601104e-04, 5.71535026e-04, 5.69476390e-04, 5.67425169e-04,\n",
       "       5.65381336e-04, 5.63344865e-04, 5.61315730e-04, 5.59293903e-04,\n",
       "       5.57279359e-04, 5.55272070e-04, 5.53272013e-04, 5.51279159e-04,\n",
       "       5.49293483e-04, 5.47314960e-04, 5.45343563e-04, 5.43379267e-04,\n",
       "       5.41422046e-04, 5.39471875e-04, 5.37528729e-04, 5.35592581e-04,\n",
       "       5.33663408e-04, 5.31741183e-04, 5.29825882e-04, 5.27917480e-04,\n",
       "       5.26015951e-04, 5.24121272e-04, 5.22233418e-04, 5.20352363e-04,\n",
       "       5.18478084e-04, 5.16610556e-04, 5.14749755e-04, 5.12895656e-04,\n",
       "       5.11048235e-04, 5.09207469e-04, 5.07373333e-04, 5.05545804e-04,\n",
       "       5.03724857e-04, 5.01910469e-04, 5.00102617e-04, 4.98301276e-04,\n",
       "       4.96506423e-04, 4.94718036e-04, 4.92936090e-04, 4.91160563e-04,\n",
       "       4.89391431e-04, 4.87628671e-04, 4.85872261e-04, 4.84122177e-04,\n",
       "       4.82378397e-04, 4.80640898e-04, 4.78909657e-04, 4.77184652e-04,\n",
       "       4.75465861e-04, 4.73753260e-04, 4.72046828e-04, 4.70346543e-04,\n",
       "       4.68652382e-04, 4.66964323e-04, 4.65282344e-04, 4.63606424e-04,\n",
       "       4.61936541e-04, 4.60272672e-04, 4.58614796e-04, 4.56962892e-04,\n",
       "       4.55316938e-04, 4.53676913e-04, 4.52042795e-04, 4.50414563e-04,\n",
       "       4.48792196e-04, 4.47175672e-04, 4.45564971e-04, 4.43960072e-04,\n",
       "       4.42360954e-04, 4.40767595e-04, 4.39179976e-04, 4.37598075e-04,\n",
       "       4.36021872e-04, 4.34451346e-04, 4.32886477e-04, 4.31327245e-04,\n",
       "       4.29773630e-04, 4.28225610e-04, 4.26683166e-04, 4.25146278e-04,\n",
       "       4.23614925e-04, 4.22089089e-04, 4.20568748e-04, 4.19053884e-04,\n",
       "       4.17544476e-04, 4.16040505e-04, 4.14541951e-04, 4.13048795e-04,\n",
       "       4.11561017e-04, 4.10078598e-04, 4.08601519e-04, 4.07129760e-04,\n",
       "       4.05663302e-04, 4.04202126e-04, 4.02746213e-04, 4.01295545e-04,\n",
       "       3.99850101e-04, 3.98409864e-04, 3.96974815e-04, 3.95544935e-04,\n",
       "       3.94120205e-04, 3.92700607e-04, 3.91286122e-04, 3.89876732e-04,\n",
       "       3.88472418e-04, 3.87073163e-04, 3.85678948e-04, 3.84289755e-04,\n",
       "       3.82905565e-04, 3.81526361e-04, 3.80152125e-04, 3.78782839e-04,\n",
       "       3.77418486e-04, 3.76059046e-04, 3.74704503e-04, 3.73354839e-04,\n",
       "       3.72010036e-04, 3.70670078e-04, 3.69334946e-04, 3.68004622e-04,\n",
       "       3.66679091e-04, 3.65358334e-04, 3.64042335e-04, 3.62731075e-04,\n",
       "       3.61424539e-04, 3.60122708e-04, 3.58825567e-04, 3.57533098e-04,\n",
       "       3.56245285e-04, 3.54962110e-04, 3.53683557e-04, 3.52409609e-04,\n",
       "       3.51140250e-04, 3.49875463e-04, 3.48615232e-04, 3.47359540e-04,\n",
       "       3.46108371e-04, 3.44861709e-04, 3.43619537e-04, 3.42381839e-04,\n",
       "       3.41148599e-04, 3.39919802e-04, 3.38695430e-04, 3.37475469e-04,\n",
       "       3.36259902e-04, 3.35048713e-04, 3.33841887e-04, 3.32639408e-04,\n",
       "       3.31441260e-04, 3.30247428e-04, 3.29057895e-04, 3.27872648e-04,\n",
       "       3.26691670e-04, 3.25514945e-04, 3.24342459e-04, 3.23174196e-04,\n",
       "       3.22010141e-04, 3.20850279e-04, 3.19694595e-04, 3.18543074e-04,\n",
       "       3.17395700e-04, 3.16252459e-04, 3.15113336e-04, 3.13978316e-04,\n",
       "       3.12847384e-04, 3.11720526e-04, 3.10597727e-04, 3.09478972e-04,\n",
       "       3.08364246e-04, 3.07253536e-04, 3.06146827e-04, 3.05044103e-04,\n",
       "       3.03945352e-04, 3.02850559e-04, 3.01759708e-04, 3.00672787e-04,\n",
       "       2.99589781e-04, 2.98510676e-04, 2.97435458e-04, 2.96364113e-04,\n",
       "       2.95296626e-04, 2.94232985e-04, 2.93173175e-04, 2.92117182e-04,\n",
       "       2.91064993e-04, 2.90016593e-04, 2.88971970e-04, 2.87931110e-04,\n",
       "       2.86893999e-04, 2.85860623e-04, 2.84830970e-04, 2.83805025e-04,\n",
       "       2.82782776e-04, 2.81764208e-04, 2.80749310e-04, 2.79738067e-04,\n",
       "       2.78730467e-04, 2.77726496e-04, 2.76726141e-04, 2.75729390e-04,\n",
       "       2.74736228e-04, 2.73746644e-04, 2.72760625e-04, 2.71778157e-04,\n",
       "       2.70799227e-04, 2.69823824e-04, 2.68851934e-04, 2.67883545e-04,\n",
       "       2.66918644e-04, 2.65957219e-04, 2.64999256e-04, 2.64044744e-04,\n",
       "       2.63093670e-04, 2.62146022e-04, 2.61201787e-04, 2.60260953e-04,\n",
       "       2.59323508e-04, 2.58389440e-04, 2.57458736e-04, 2.56531385e-04,\n",
       "       2.55607374e-04, 2.54686691e-04, 2.53769324e-04, 2.52855261e-04,\n",
       "       2.51944491e-04, 2.51037002e-04, 2.50132781e-04, 2.49231817e-04,\n",
       "       2.48334099e-04, 2.47439614e-04, 2.46548350e-04, 2.45660298e-04,\n",
       "       2.44775443e-04, 2.43893776e-04, 2.43015285e-04, 2.42139958e-04,\n",
       "       2.41267784e-04, 2.40398751e-04, 2.39532849e-04, 2.38670065e-04,\n",
       "       2.37810390e-04, 2.36953810e-04, 2.36100316e-04, 2.35249897e-04,\n",
       "       2.34402540e-04, 2.33558236e-04, 2.32716972e-04, 2.31878739e-04,\n",
       "       2.31043526e-04, 2.30211320e-04, 2.29382112e-04, 2.28555891e-04,\n",
       "       2.27732646e-04, 2.26912366e-04, 2.26095041e-04, 2.25280660e-04,\n",
       "       2.24469212e-04, 2.23660687e-04, 2.22855074e-04, 2.22052363e-04,\n",
       "       2.21252543e-04, 2.20455604e-04, 2.19661536e-04, 2.18870327e-04,\n",
       "       2.18081969e-04, 2.17296451e-04, 2.16513761e-04, 2.15733891e-04,\n",
       "       2.14956830e-04, 2.14182568e-04, 2.13411095e-04, 2.12642400e-04,\n",
       "       2.11876475e-04, 2.11113308e-04, 2.10352890e-04, 2.09595211e-04,\n",
       "       2.08840261e-04, 2.08088031e-04, 2.07338510e-04, 2.06591688e-04,\n",
       "       2.05847557e-04, 2.05106106e-04, 2.04367326e-04, 2.03631206e-04,\n",
       "       2.02897738e-04, 2.02166913e-04, 2.01438719e-04, 2.00713148e-04,\n",
       "       1.99990191e-04, 1.99269838e-04, 1.98552080e-04, 1.97836907e-04,\n",
       "       1.97124309e-04, 1.96414279e-04, 1.95706806e-04, 1.95001882e-04,\n",
       "       1.94299496e-04, 1.93599640e-04, 1.92902306e-04, 1.92207483e-04,\n",
       "       1.91515163e-04, 1.90825336e-04, 1.90137994e-04, 1.89453128e-04,\n",
       "       1.88770729e-04, 1.88090788e-04, 1.87413295e-04, 1.86738244e-04,\n",
       "       1.86065623e-04, 1.85395426e-04, 1.84727642e-04, 1.84062264e-04,\n",
       "       1.83399282e-04, 1.82738688e-04, 1.82080474e-04, 1.81424631e-04,\n",
       "       1.80771150e-04, 1.80120023e-04, 1.79471241e-04, 1.78824796e-04,\n",
       "       1.78180679e-04, 1.77538883e-04, 1.76899398e-04, 1.76262216e-04,\n",
       "       1.75627330e-04, 1.74994731e-04, 1.74364410e-04, 1.73736359e-04,\n",
       "       1.73110571e-04, 1.72487037e-04, 1.71865748e-04, 1.71246698e-04,\n",
       "       1.70629877e-04, 1.70015278e-04, 1.69402893e-04, 1.68792713e-04,\n",
       "       1.68184732e-04, 1.67578940e-04, 1.66975330e-04, 1.66373895e-04,\n",
       "       1.65774626e-04, 1.65177515e-04, 1.64582555e-04, 1.63989738e-04,\n",
       "       1.63399057e-04, 1.62810503e-04, 1.62224069e-04, 1.61639747e-04,\n",
       "       1.61057530e-04, 1.60477410e-04, 1.59899380e-04, 1.59323432e-04,\n",
       "       1.58749558e-04, 1.58177751e-04, 1.57608004e-04, 1.57040309e-04,\n",
       "       1.56474659e-04, 1.55911046e-04, 1.55349464e-04, 1.54789904e-04,\n",
       "       1.54232359e-04, 1.53676823e-04, 1.53123288e-04, 1.52571747e-04,\n",
       "       1.52022193e-04, 1.51474617e-04, 1.50929015e-04, 1.50385377e-04,\n",
       "       1.49843698e-04, 1.49303969e-04, 1.48766185e-04, 1.48230338e-04,\n",
       "       1.47696421e-04, 1.47164427e-04, 1.46634349e-04, 1.46106180e-04,\n",
       "       1.45579914e-04, 1.45055544e-04, 1.44533062e-04, 1.44012463e-04,\n",
       "       1.43493738e-04, 1.42976882e-04, 1.42461887e-04, 1.41948748e-04,\n",
       "       1.41437457e-04, 1.40928007e-04, 1.40420393e-04, 1.39914606e-04,\n",
       "       1.39410642e-04, 1.38908493e-04, 1.38408153e-04, 1.37909614e-04,\n",
       "       1.37412872e-04, 1.36917919e-04, 1.36424748e-04, 1.35933354e-04,\n",
       "       1.35443730e-04, 1.34955870e-04, 1.34469766e-04, 1.33985414e-04,\n",
       "       1.33502806e-04, 1.33021937e-04, 1.32542800e-04, 1.32065388e-04,\n",
       "       1.31589696e-04, 1.31115718e-04, 1.30643447e-04, 1.30172876e-04,\n",
       "       1.29704001e-04, 1.29236815e-04, 1.28771311e-04, 1.28307485e-04,\n",
       "       1.27845328e-04, 1.27384837e-04, 1.26926004e-04, 1.26468824e-04,\n",
       "       1.26013291e-04, 1.25559398e-04, 1.25107140e-04, 1.24656512e-04,\n",
       "       1.24207506e-04, 1.23760118e-04, 1.23314341e-04, 1.22870170e-04,\n",
       "       1.22427599e-04, 1.21986621e-04, 1.21547233e-04, 1.21109427e-04,\n",
       "       1.20673197e-04, 1.20238540e-04, 1.19805447e-04, 1.19373915e-04,\n",
       "       1.18943937e-04, 1.18515508e-04, 1.18088622e-04, 1.17663273e-04,\n",
       "       1.17239457e-04, 1.16817167e-04, 1.16396399e-04, 1.15977146e-04,\n",
       "       1.15559403e-04, 1.15143164e-04, 1.14728425e-04, 1.14315180e-04,\n",
       "       1.13903423e-04, 1.13493150e-04, 1.13084354e-04, 1.12677031e-04,\n",
       "       1.12271175e-04, 1.11866780e-04, 1.11463843e-04, 1.11062356e-04,\n",
       "       1.10662316e-04, 1.10263717e-04, 1.09866553e-04, 1.09470820e-04,\n",
       "       1.09076513e-04, 1.08683626e-04, 1.08292153e-04, 1.07902091e-04,\n",
       "       1.07513434e-04, 1.07126177e-04, 1.06740315e-04, 1.06355842e-04,\n",
       "       1.05972755e-04, 1.05591047e-04, 1.05210714e-04, 1.04831751e-04,\n",
       "       1.04454153e-04, 1.04077915e-04, 1.03703033e-04, 1.03329500e-04,\n",
       "       1.02957314e-04, 1.02586467e-04, 1.02216957e-04, 1.01848777e-04,\n",
       "       1.01481924e-04, 1.01116392e-04, 1.00752176e-04, 1.00389273e-04,\n",
       "       1.00027676e-04, 9.96673826e-05, 9.93083864e-05, 9.89506833e-05,\n",
       "       9.85942687e-05, 9.82391378e-05, 9.78852861e-05, 9.75327090e-05,\n",
       "       9.71814018e-05, 9.68313600e-05, 9.64825790e-05, 9.61350544e-05,\n",
       "       9.57887815e-05, 9.54437558e-05, 9.50999729e-05, 9.47574283e-05,\n",
       "       9.44161175e-05, 9.40760361e-05, 9.37371797e-05, 9.33995438e-05,\n",
       "       9.30631240e-05, 9.27279160e-05, 9.23939154e-05, 9.20611179e-05,\n",
       "       9.17295190e-05, 9.13991146e-05, 9.10699003e-05, 9.07418718e-05,\n",
       "       9.04150248e-05, 9.00893551e-05, 8.97648584e-05, 8.94415306e-05,\n",
       "       8.91193674e-05, 8.87983646e-05, 8.84785180e-05, 8.81598235e-05,\n",
       "       8.78422769e-05, 8.75258741e-05, 8.72106109e-05, 8.68964833e-05,\n",
       "       8.65834872e-05, 8.62716185e-05, 8.59608731e-05, 8.56512470e-05,\n",
       "       8.53427362e-05, 8.50353366e-05, 8.47290442e-05, 8.44238551e-05,\n",
       "       8.41197652e-05, 8.38167707e-05, 8.35148675e-05, 8.32140518e-05,\n",
       "       8.29143196e-05, 8.26156670e-05, 8.23180902e-05, 8.20215852e-05,\n",
       "       8.17261481e-05, 8.14317753e-05, 8.11384627e-05, 8.08462067e-05,\n",
       "       8.05550033e-05, 8.02648488e-05, 7.99757395e-05, 7.96876715e-05,\n",
       "       7.94006411e-05, 7.91146446e-05, 7.88296782e-05, 7.85457383e-05,\n",
       "       7.82628211e-05, 7.79809229e-05, 7.77000401e-05, 7.74201691e-05,\n",
       "       7.71413061e-05, 7.68634476e-05, 7.65865899e-05, 7.63107294e-05,\n",
       "       7.60358625e-05, 7.57619858e-05, 7.54890955e-05, 7.52171881e-05,\n",
       "       7.49462601e-05, 7.46763080e-05, 7.44073283e-05, 7.41393174e-05,\n",
       "       7.38722719e-05, 7.36061882e-05, 7.33410630e-05, 7.30768927e-05,\n",
       "       7.28136740e-05, 7.25514033e-05, 7.22900773e-05, 7.20296927e-05,\n",
       "       7.17702459e-05, 7.15117336e-05, 7.12541525e-05, 7.09974991e-05,\n",
       "       7.07417702e-05, 7.04869625e-05, 7.02330725e-05, 6.99800970e-05,\n",
       "       6.97280328e-05, 6.94768764e-05, 6.92266247e-05, 6.89772744e-05,\n",
       "       6.87288223e-05, 6.84812650e-05, 6.82345994e-05, 6.79888224e-05,\n",
       "       6.77439306e-05, 6.74999208e-05, 6.72567900e-05, 6.70145349e-05,\n",
       "       6.67731525e-05, 6.65326394e-05, 6.62929927e-05, 6.60542092e-05,\n",
       "       6.58162857e-05, 6.55792193e-05, 6.53430067e-05, 6.51076450e-05,\n",
       "       6.48731310e-05, 6.46394617e-05, 6.44066341e-05, 6.41746451e-05,\n",
       "       6.39434918e-05, 6.37131710e-05, 6.34836799e-05, 6.32550153e-05,\n",
       "       6.30271744e-05, 6.28001542e-05, 6.25739516e-05, 6.23485639e-05,\n",
       "       6.21239879e-05, 6.19002209e-05, 6.16772599e-05, 6.14551020e-05,\n",
       "       6.12337443e-05, 6.10131838e-05, 6.07934179e-05, 6.05744435e-05,\n",
       "       6.03562579e-05, 6.01388581e-05, 5.99222414e-05, 5.97064050e-05,\n",
       "       5.94913459e-05, 5.92770616e-05, 5.90635490e-05, 5.88508055e-05,\n",
       "       5.86388283e-05, 5.84276146e-05, 5.82171617e-05, 5.80074669e-05,\n",
       "       5.77985273e-05, 5.75903404e-05, 5.73829033e-05, 5.71762134e-05,\n",
       "       5.69702680e-05, 5.67650644e-05, 5.65605999e-05, 5.63568719e-05,\n",
       "       5.61538777e-05, 5.59516147e-05, 5.57500802e-05, 5.55492716e-05,\n",
       "       5.53491863e-05, 5.51498218e-05, 5.49511753e-05, 5.47532443e-05,\n",
       "       5.45560263e-05, 5.43595187e-05, 5.41637188e-05, 5.39686242e-05,\n",
       "       5.37742324e-05, 5.35805407e-05, 5.33875467e-05, 5.31952478e-05,\n",
       "       5.30036416e-05, 5.28127256e-05, 5.26224972e-05, 5.24329540e-05,\n",
       "       5.22440935e-05, 5.20559133e-05, 5.18684109e-05, 5.16815839e-05,\n",
       "       5.14954298e-05, 5.13099462e-05, 5.11251308e-05, 5.09409810e-05,\n",
       "       5.07574945e-05, 5.05746690e-05, 5.03925019e-05, 5.02109911e-05,\n",
       "       5.00301340e-05, 4.98499283e-05, 4.96703718e-05, 4.94914620e-05,\n",
       "       4.93131966e-05, 4.91355733e-05, 4.89585898e-05, 4.87822438e-05,\n",
       "       4.86065329e-05, 4.84314550e-05, 4.82570077e-05, 4.80831888e-05,\n",
       "       4.79099959e-05, 4.77374269e-05, 4.75654794e-05, 4.73941513e-05,\n",
       "       4.72234403e-05, 4.70533442e-05, 4.68838608e-05, 4.67149878e-05,\n",
       "       4.65467231e-05, 4.63790645e-05, 4.62120098e-05, 4.60455568e-05,\n",
       "       4.58797034e-05, 4.57144473e-05, 4.55497865e-05, 4.53857188e-05,\n",
       "       4.52222421e-05, 4.50593542e-05, 4.48970530e-05, 4.47353364e-05,\n",
       "       4.45742023e-05, 4.44136486e-05, 4.42536732e-05, 4.40942741e-05,\n",
       "       4.39354490e-05, 4.37771961e-05, 4.36195131e-05, 4.34623982e-05,\n",
       "       4.33058491e-05, 4.31498640e-05, 4.29944407e-05, 4.28395772e-05,\n",
       "       4.26852715e-05, 4.25315216e-05, 4.23783255e-05, 4.22256812e-05,\n",
       "       4.20735868e-05, 4.19220401e-05, 4.17710394e-05, 4.16205825e-05,\n",
       "       4.14706676e-05, 4.13212926e-05, 4.11724557e-05, 4.10241549e-05,\n",
       "       4.08763883e-05, 4.07291539e-05, 4.05824498e-05, 4.04362742e-05,\n",
       "       4.02906251e-05, 4.01455006e-05, 4.00008988e-05, 3.98568179e-05,\n",
       "       3.97132559e-05, 3.95702110e-05, 3.94276814e-05, 3.92856652e-05,\n",
       "       3.91441605e-05, 3.90031655e-05, 3.88626784e-05, 3.87226972e-05,\n",
       "       3.85832203e-05, 3.84442458e-05, 3.83057718e-05, 3.81677967e-05,\n",
       "       3.80303185e-05, 3.78933354e-05, 3.77568458e-05, 3.76208479e-05,\n",
       "       3.74853397e-05, 3.73503197e-05, 3.72157860e-05, 3.70817369e-05,\n",
       "       3.69481706e-05, 3.68150855e-05, 3.66824796e-05, 3.65503515e-05,\n",
       "       3.64186992e-05, 3.62875212e-05, 3.61568156e-05, 3.60265809e-05,\n",
       "       3.58968152e-05, 3.57675169e-05, 3.56386844e-05, 3.55103159e-05,\n",
       "       3.53824098e-05, 3.52549644e-05, 3.51279781e-05, 3.50014491e-05,\n",
       "       3.48753759e-05, 3.47497568e-05, 3.46245902e-05, 3.44998745e-05,\n",
       "       3.43756079e-05, 3.42517889e-05, 3.41284160e-05, 3.40054874e-05,\n",
       "       3.38830016e-05, 3.37609570e-05, 3.36393520e-05, 3.35181850e-05,\n",
       "       3.33974544e-05, 3.32771587e-05, 3.31572963e-05, 3.30378656e-05,\n",
       "       3.29188651e-05, 3.28002933e-05, 3.26821485e-05, 3.25644293e-05,\n",
       "       3.24471341e-05, 3.23302614e-05, 3.22138097e-05, 3.20977774e-05,\n",
       "       3.19821631e-05, 3.18669652e-05, 3.17521822e-05, 3.16378127e-05,\n",
       "       3.15238551e-05, 3.14103080e-05, 3.12971699e-05, 3.11844393e-05,\n",
       "       3.10721147e-05, 3.09601948e-05, 3.08486779e-05, 3.07375628e-05,\n",
       "       3.06268479e-05, 3.05165317e-05, 3.04066129e-05, 3.02970901e-05,\n",
       "       3.01879617e-05, 3.00792264e-05, 2.99708828e-05, 2.98629294e-05,\n",
       "       2.97553648e-05, 2.96481877e-05, 2.95413967e-05, 2.94349903e-05,\n",
       "       2.93289671e-05, 2.92233259e-05, 2.91180652e-05, 2.90131836e-05,\n",
       "       2.89086798e-05, 2.88045524e-05, 2.87008000e-05, 2.85974214e-05,\n",
       "       2.84944152e-05, 2.83917799e-05, 2.82895144e-05, 2.81876172e-05,\n",
       "       2.80860870e-05, 2.79849225e-05, 2.78841225e-05, 2.77836855e-05,\n",
       "       2.76836102e-05, 2.75838955e-05, 2.74845399e-05, 2.73855421e-05,\n",
       "       2.72869010e-05, 2.71886152e-05, 2.70906833e-05, 2.69931043e-05,\n",
       "       2.68958767e-05, 2.67989993e-05, 2.67024708e-05, 2.66062901e-05,\n",
       "       2.65104557e-05, 2.64149666e-05, 2.63198214e-05, 2.62250190e-05,\n",
       "       2.61305580e-05, 2.60364372e-05, 2.59426555e-05, 2.58492115e-05,\n",
       "       2.57561041e-05, 2.56633321e-05, 2.55708943e-05, 2.54787894e-05,\n",
       "       2.53870163e-05, 2.52955737e-05, 2.52044605e-05, 2.51136755e-05,\n",
       "       2.50232175e-05, 2.49330853e-05, 2.48432778e-05, 2.47537937e-05,\n",
       "       2.46646320e-05, 2.45757914e-05, 2.44872708e-05, 2.43990691e-05])"
      ]
     },
     "execution_count": 200,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cost_2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "matrix([[-3.89578118],\n",
       "        [ 1.19303369]])"
      ]
     },
     "execution_count": 202,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "theta_3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x1e5ee569f08>"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEGCAYAAABvtY4XAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAf3klEQVR4nO3de5gcVZ3/8fd3JpMMySSB3MZciEkIBAEnEzJLuD2QISqIrgriBTCGy5pdcRXFyxrR+BhBYUEXWEREAwIbSYRFXJGfCDIDCwuRDIYYSDAJATJcDEy4ZHK/fH9/nOpMT+bW0901PV3zeT3PeaaruqrOOV3Jt0+fOnXK3B0REUmekkIXQERE4qEALyKSUArwIiIJpQAvIpJQCvAiIgnVr9AFSDdixAifMGFCVvtu2bKFQYMG5bdAvZzq3DeozsmXS30bGhrecPeR7b0XW4A3synAkrRVk4D57n5NR/tMmDCBZcuWZZVffX09M2fOzGrfYqU69w2qc/LlUl8ze7Gj92IL8O7+HFAdFaAUeBn4TVz5iYhIaz3VBz8LWOfuHX7TiIhIfllP3MlqZjcDT7n79e28NxeYC1BZWTl98eLFWeXR3NxMRUVFTuUsNqpz36A6J18u9a2trW1w95r23os9wJtZf+AV4Eh3/3tn29bU1Lj64DOnOvcNfbnOu3btorGxke3btxe6SLHavn075eXlnW5TXl7OuHHjKCsra7XezDoM8D0xiuaDhNZ7p8FdRGR/jY2NDB48mAkTJmBmhS5ObDZv3szgwYM7fN/daWpqorGxkYkTJ2Z83J7ogz8buKMH8hGRhNm+fTvDhw9PdHDPhJkxfPjwbv+SiTXAm9lA4P3A3XHmIyLJ1deDe0o2n0OsAd7dt7r7cHd/O858+P73OejPf441CxGRYpOMqQquuIJhDQ2FLoWISK+SjABfWgp79xa6FCIibSxfvpz77ruv022WLFlCVVUVVVVVHH/88Tz99NN5yTsxAd727Cl0KURE2sgkwE+YMIGHH36YFStW8J3vfIe5c+fmJe9eNdlY1kpLMbXgRRLty3/4MstfW57XY1a/q5prTutweqx9brvtNq6++mrMjKqqKi677DIuuOACXn/9dUaOHMktt9zC+PHjufPOO/ne975HaWkpQ4cO5cEHH2T+/Pls27aNRx99lHnz5vGpT32qzfFnzJixb5jkscceS2NjY17ql4wA36+fWvAiEotnnnmGyy+/nMcee4wRI0awadMm5syZw2c/+1nmzJnDzTffzJe+9CXuueceFixYwP3338/YsWN566236N+/PwsWLGDZsmVcf32bG/nbtXDhQj74wQ/mpezJCPBqwYskXiYt7Tg89NBDnHXWWYwYMQKAYcOG8fjjj3P33WH09+zZs/nGN74BwAknnMB5553HJz/5Sc4888xu51VXV8fChQt59NFH81L2xPTB6yKriMTB3bscg556/8Ybb+Syyy5jw4YNVFdX09TUlHE+K1as4J/+6Z/47W9/y/Dhw3Mqc0piAry6aEQkDrNmzeLXv/71vmC9adMmjj/+eFITIy5atIgTTzwRgHXr1jFjxgwWLFjAiBEj2LBhA4MHD2bz5s2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soOiXzweidZkp9EWIPFzEOB34G7AOuLTQ5cljvU4k/BRbASyP0umEvsc/AWuiv8Oi7Y0womgd8FfCCIWC1yOH+s8E7o1eTwL+DKwF7gQGROvLo+W10fuTCl3uLOtaDSyLzvU9wEFJP8/A94DVwErgdmBA0s4zcAfhGsMuQkv8wmzOK3BBVPe1wPndKYOmKhARSahi76IREZEOKMCLiCSUAryISEIpwIuIJJQCvIhIQinAS58Szdx4UfR6jJndVegyicRFwySlT4nm9bnXwyyGIonWr+tNRBLlCuAQM1tOuNnkPe5+lJmdB3yMMHXtUcCPgP7AbGAHcLq7bzKzQwg3pIwEtgKfc/fVZvYJwrSuewh3IZ7Uw/USaUNdNNLXfBNY5+7VwNf3e+8o4BzCvNuXA1s9TAD2OPDZaJubgC+6+3Tga8AN0fr5wKnuPhX4SLxVEMmMWvAiLercfTOw2czeBn4Xrf8rUBXN7Hk8cGeYQgUIt9gDPAb80sx+TZg8S6TgFOBFWuxIe703bXkv4f9KCWHO8ur9d3T3fzGzGcCHgOVmVu3uTXEXWKQz6qKRvmYzMDibHT3Mx78+6m9PPUdzavT6EHdf6u7zCU8cOriTQ4n0CLXgpU9x9yYzeyx6EPKqLndo61zgp2b2baCMMG/908BVZnYoYVbAP0XrRApKwyRFRBJKXTQiIgmlAC8iklAK8CIiCaUALyKSUArwIiIJpQAvIpJQCvAiIgn1/wFMVePUFdvO3QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#误差函数\n",
    "plt.xlabel('times')\n",
    "plt.ylabel('error value')\n",
    "plt.grid(True)\n",
    "# plt.plot(data_x, data_y, 'r.')\n",
    "plt.plot(np.arange(1000), cost_2, 'g-', label=\"cost_2\")\n",
    "plt.plot(np.arange(1000),cost,'r',label=\"cost\")\n",
    "plt.legend(loc=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "用向量来算梯度下降误差函数怪怪的！哪里错了？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 230,
   "metadata": {},
   "outputs": [],
   "source": [
    "yy = data_t[...,0:2].dot(theta)\n",
    "yy_2 = data_t[...,0:2].dot(theta_2.T)\n",
    "yy_3 = data_t[...,0:2].dot(theta_3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x1e5eef330c8>"
      ]
     },
     "execution_count": 231,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEHCAYAAACncpHfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de3xU1bXA8d9KeIW3AkUUK1jfiI3yMmIl8f1otRb7sN7WirfopdhSWyvWq9VSLyraaout0IpCi8Ur2opcqraaEYWIgEQIooAWFUEeUR5BEkiy7h/nTDLvmUzmzHN9P598MrPPOTMrw7D3Pvvss7aoKsYYYwpPUaYDMMYYkxnWABhjTIGyBsAYYwqUNQDGGFOgrAEwxpgCZQ2AMcYUqA5evbCIHAnMAQ4DmoGZqvqgiNwBfB/Y4e76c1VdFOu1+vbtq4MGDUoqjn379tGtW7ekjs0Ei9d7uRazxeutXIsXEo955cqVO1W1X9QdVNWTH2AAcJr7uAewHjgJuAP4aVtea9iwYZqsysrKpI/NBIvXe7kWs8XrrVyLVzXxmIEVGqNu9ewMQFW3Alvdx3tFZB1whFfvZ4wxpm3Scg1ARAYBpwLL3KKJIrJaRGaJyCHpiMEYY0wwUY9TQYhId+Bl4C5VfVpE+gM7AQWmAANUdVyE48YD4wH69+8/bN68eUm9f11dHd27d082/LSzeL2XazF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vVX3ZLZqNs3iJnz+p1kpgUISXOBP4qzpJ2LYBLwMj4sR4Ls7wCQDq5IyPyo3tGHEyNV4JPBVQwUbzoqruVtV64C3gqDj7B0okm2W0fWIdG21bFfBzEbkZJ4vt/kQDNZljDYBJlL8nXKqqN7hDBrHy6oZWNv7njbR+77pEOfZ3wHRVHYozBh9tv0Q1uL+biJwCPaH8wBGOaWselT8DV+GcCTyawP4NAY+jxR5NItkso+2zE2fIqEOEY1uOcbf3Aj5R1cdxUpvvx2m8z25DrCZDrAEw7bEY+KqIdBUnA+HlONcHAD4vImXu4ytxhnXAWbZumPt4bJTX7QV85D4OXIt1L85SeUFUdTfwacD4/ndwevFt+Tu+KSLFItIP5+zh9TjHvICTsA8ACV+4JVKsj+EMQ6Gqa9sQXzKiZr8VkbfdfSJmFVUnQVgl4L8gHZgxMzCT5hXAS6qqInI08J6q/tbd5xSP/z6TAtYAmKSps3zdYziV5TKcTIqr3M3rgKtFZDXOuqr+WSh3Ag+KyCs4vdpI7gCedPfZGVD+LHC5/yJwyDFX44zdr8YZO/9lG/6Uv+FkYHwTZyz/Z6r6cZxjfgUc4l44fhOoCNyoqrXAEnf7NLdsG87nkkjvPyEi8kMR2YzTS18tIn9yNy3CWcd2I866AhPc/fvinvG4Q1ATcdIcrwP+N6Bhuhm4UUQ24ozxP+KWPwL0cctvxLnWAc61ihp3mPAEnGsyJstZNlCTcu6MnYXulFHjcmdCrcGZVro7QzF8GTja7ambApdPS0Iak7VE5FxgFvDrTFX+AKq6MFPvbbKPnQEYY0yBsmsAxhhToKwBMMaYAmUNgDHGFChrAIwxpkBZA2CMMQXKGgBjjClQ/w8og0r1Gsm8nQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.xlabel('Population of city in 10,000s')\n",
    "plt.ylabel('Profit in $10,000s')\n",
    "plt.grid(True)\n",
    "plt.plot(data_x, data_y, 'r.')\n",
    "plt.plot(data_x, yy, 'g',label='theta')\n",
    "plt.plot(data_x,yy_2,'b',label='theta_2')\n",
    "plt.plot(data_x,yy_3, 'y', label='theta_3')\n",
    "plt.legend(loc=2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "theta2的拟合效果明显比theta差！找原因！"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 多变量拟合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
